import $request from '../utils/request'

export function attendanceCheck(data, method = 'post') {
  return $request({
    url: 'api/workclock/set',
    method,
    data
  }, true)
}

export function getAttendanceInfo(data, method = 'post') {
  return $request({
    url: 'api/workclock/getinfo',
    method,
    data
  }, true)
}
export function getAttendanceList(data, method = 'get') {
  return $request({
    url: 'api/workclock/getCount',
    method,
    data
  }, false)
}
export function addAttendanceLeave(data, method = 'post') {
  return $request({
    url: 'api/workleave/set',
    method,
    data
  }, true)
}

export function getAttendanceLeaveList(data, method = 'post') {
  return $request({
    url: 'api/workleave/getCount',
    method,
    data
  }, true)
}

export function WorkpayrollList(data, method = 'post') {
  return $request({
    url: 'api/Workpayroll/form_list',
    method,
    data
  }, true)
}

export function WorkpayrollInfo(data, method = 'post') {
  return $request({
    url: 'api/Workpayroll/info',
    method,
    data
  }, true)
}